// 1. 引入相关模块
import { defineStore } from 'pinia';
import type { ReportDataModel } from '@/api/mock/model/data';
import { reqGetReportData } from '@/api/mock';

// 2. 定义store

export const useReportDataStore = defineStore({
  id: 'reportData', // 唯一标识 或是模块名 或是命名空间

  state() {
    return {
      reportData: {} as ReportDataModel,
    };
  },

  actions: {
    async getReportData() {
      const result = await reqGetReportData();
      console.log('1111', result);

      this.reportData = result;
    },
  },
});
